# 1. Remove existing MariaDB installation to avoid conflicts
apt purge mariadb-server mariadb-client  

# 2. Fix any broken packages before proceeding  
dpkg --configure -a  

# 3. Download the MySQL APT configuration package  
wget https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb  

# 4. Install the MySQL server  
apt install default-mysql-server  

# 5. Initialize the MySQL database  
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql  

# 6. Install PHP and MySQL extension  
aptitude install php php-mysql  

# 7. Remove Apache and its PHP module (optional, if you don’t need Apache)  
aptitude remove apache2 libapache2-mod-php7.4  

# 8. Install phpMyAdmin without extra dependencies  
aptitude install phpmyadmin --without-recommends  

# 9. Start phpMyAdmin using PM2 as a standalone PHP server  
pm2 start php --name phpmyadmin -- -S 0.0.0.0:8080 -t /usr/share/phpmyadmin



pm2 start node \
  --name server \
  -- server-function-hub.js